package com.google.gwt.indexeddb.client;

/**
 * @author le_404444 The IDBErrorEvent interface of the IndexedDB API represents an event related to
 *         an error condition in carrying out the request on the source.
 * @param <T> Type of the source of the event
 */
public class IDBErrorEvent extends IDBEvent {
  
  protected IDBErrorEvent() {
  }
  
  /**
   * @return The most appropriate error code for the situation. Valid error codes are defined on
   *         IDBDatabaseException.
   */
  
  public final native int getCode() /*-{
		return this.code;
  }-*/;

  /**
   * @return A description of the reason for the error, which should be localized to the user's
   *         language.
   */
  public final native String getMessage() /*-{
		return this.message;
  }-*/;
}
